home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
dash_test.gl.p
< prev
next >
Wrap
Text File
|
2002-11-29
|
24KB
|
878 lines
{
ChildID = {
GuiAnimation("background") {
X = 0;
Y = 280;
ScriptID = Script {
@draw {
DrawRect(
0,
0,
CVarGetInt("SCREEN_MAX_X"),
CVarGetInt("SCREEN_MAX_Y"),
0,
0,
0
);
}
}
},
WeatherCenter("weather_center") {
ScriptID = script {
@loaded {
ResPropSetStr(SELF,"season","s");
ResPropSetStr(SELF,"time_of_day","d");
ResPropSetStr(SELF,"scenery","field_and_rock");
ResPropSetStr(SELF,"adornment","barn");
ResPropSetStr(SELF,"weather","d");
ResPropSetStr(SELF,"head_lights","l");
}
@animate {
resid left;
resid right;
resid road;
resid adornl;
resid adornr;
resid adornl_current;
resid adornr_current;
resid left_current;
resid right_current;
resid road_current;
str scenery;
str season;
str time_of_day;
str weather;
str adornment;
str head_lights;
ResPropAlias(SELF,"scenery","scenery");
ResPropAlias(SELF,"adornment","adornment");
ResPropAlias(SELF,"season","season");
ResPropAlias(SELF,"time_of_day","time_of_day");
ResPropAlias(SELF,"weather","weather");
ResPropAlias(SELF,"head_lights","head_lights");
left_current = ResPropGetResID(GuiSiblingByName("left_flicker"), "AnimationID");
right_current = ResPropGetResID(GuiSiblingByName("right_flicker"), "AnimationID");
road_current = ResPropGetResID(GuiSiblingByName("road"), "AnimationID");
adornl_current = ResPropGetResID(GuiSiblingByName("left_adorn1"), "AnimationID");
adornr_current = ResPropGetResID(GuiSiblingByName("right_adorn1"), "AnimationID");
adornl = ResByName(StrFormatStr("anim/adornment/%s%s%s%s%s%s%s", adornment, "/", adornment, "_l", time_of_day, season, ".anm"));
adornr = ResByName(StrFormatStr("anim/adornment/%s%s%s%s%s%s%s", adornment, "/", adornment, "_r", time_of_day, season, ".anm"));
left = ResByName(StrFormatStr("anim/flicker/%s%s%s%s%s%s%s", scenery, "/", scenery, "_l", time_of_day, season, ".anm"));
right = ResByName(StrFormatStr("anim/flicker/%s%s%s%s%s%s%s", scenery, "/", scenery, "_r", time_of_day, season, ".anm"));
road = ResByName(StrFormatStr("anim/road/%s_%s%s%s.anm","pavement",time_of_day, weather,head_lights));
if (adornl != adornl_current) {
ResPropSetResID(GuiSiblingByName("left_adorn1"), "AnimationID", adornl);
}
if (adornr != adornr_current) {
ResPropSetResID(GuiSiblingByName("right_adorn1"), "AnimationID", adornr);
}
if (left != left_current ) {
ResPropSetResID(GuiSiblingByName("left_flicker"), "AnimationID", left);
}
if (right != right_current) {
ResPropSetResID(GuiSiblingByName("right_flicker"), "AnimationID", right);
}
if (road != road_current) {
LogStr(LOG_DEBUG,"changing road:%s",road);
ResPropSetResID(GuiSiblingByName("road"), "AnimationID", road);
}
}
}
},
GuiAnimation("sky") {
AnimationID = "anim/sky/blue.pcx";
X = 0;
Y = 0;
},
GuiAnimation("horizon") {
X = 0;
Y = 0;
},
GuiAnimation("left_flicker") {
X = -13;
Y = 0;
},
GuiAnimation("left_adorn1") {
X = -13;
Y = 0;
},
GuiAnimation("left_adorn2") {
X = -13;
Y = 0;
},
GuiAnimation("right_flicker") {
X = 314;
Y = 0;
},
GuiAnimation("right_adorn1") {
X = 314;
Y = 0;
},
GuiAnimation("right_adorn2") {
X = 314;
Y = 0;
},
GuiAnimation("road") {
X = 0;
Y = 150;
},
GuiAnimation("sign") {
X = 321;
Y = -29;
State = STOPPED;
AnimationID = "anim/sign/sign_night.anm";
ScriptID = Script {
@loaded {
ResByName("font/arial_06.tf");
ResByName("font/arial_08.tf");
ResByName("font/arial_10.tf");
ResByName("font/arial_16.tf");
}
@animate {
if (InputKeyCheck(INPUT_S)) {
ResPropSetInt(SELF,"State", PLAYING);
} else {
ResPropSetInt(SELF,"State", STOPPED);
}
if (InputKeyCheck(INPUT_R)) {
ResPropSetInt(SELF,"Direction",REVERSE);
}
if (InputKeyCheck(INPUT_F)) {
ResPropSetInt(SELF,"Direction",FORWARD);
}
}
@draw {
int frame;
int x;
int y;
str text;
frame = ResPropGetInt(SELF,"CurrentFrame");
if (frame<10) {stop;}
text = "Minneapolis - St. Paul\n999 Miles";
x = ResPropGetInt(SELF,"ScreenX");
y = ResPropGetInt(SELF,"ScreenY");
if (frame==13) {
DrawTextRectStr(ResByName("font/arial_06.tf"), x+40, y+146, 49, 18, "%s", text);
stop;
}
if (frame==14) {
DrawTextRectStr(ResByName("font/arial_10.tf"), x+50, y+133, 68, 28, "%s", text);
stop;
}
if (frame==15) {
DrawTextRectStr(ResByName("font/arial_16.tf"), x+73, y+107, 120, 46, "%s", text);
stop;
}
}
}
},
GuiAnimation("dash_upper") {
AnimationID = "anim/dash/day/dash_upper.pcx";
X = 0;
Y = 0;
},
GuiAnimation("dash_lower") {
AnimationID = "anim/dash/day/dash_lower.bmp";
X = 0;
Y = 236;
},
GuiButtonGroup("headlights_on") {
X = 10;
Y = 120;
RadioGroupID = 1;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "head_lights", "l" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(34/*"Headlights on"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(35/*"Headlights on"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("headlights_off") {
X = 10;
Y = 140;
RadioGroupID = 1;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "head_lights", "u" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(36/*"Headlights off"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(37/*"Headlights off"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("summer") {
X = 10;
Y = 60;
RadioGroupID = 1;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "season", "s" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(38/*"Summer"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(39/*"Summer"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("winter") {
X = 10;
Y = 80;
RadioGroupID = 1;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "season", "w" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(40/*"Winter"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(41/*"Winter"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("day") {
X = 80;
Y = 60;
RadioGroupID = 2;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "time_of_day", "d" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(42/*"Day"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(43/*"Day"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("night") {
X = 80;
Y = 80;
RadioGroupID = 2;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "time_of_day", "n" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(44/*"Night"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(45/*"Night"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("dry") {
X = 140;
Y = 60;
RadioGroupID = 3;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "weather", "d" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(46/*"Dry"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(47/*"Dry"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("wet") {
X = 140;
Y = 80;
RadioGroupID = 3;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "weather", "d" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(48/*"Wet"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(49/*"Wet"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("snow") {
X = 140;
Y = 100;
RadioGroupID = 3;
ScriptID = Script {
@activate {
ResPropSetStr(GuiSiblingByName("weather_center"), "weather", "s" );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(50/*"Snow"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
HorizontalAlign = RIGHTOF;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
HorizontalPadding = 4;
TextID = Mangle(51/*"Snow"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiListbox("flickers") {
X = 10;
Y = 300;
Height = 180;
Width = 180;
ListHilightedColor = #7FAFFF;
ScriptID = Script {
@activate {
str tmp;
tmp = GuiListboxGetSelected(SELF);
ResPropSetStr(GuiSiblingByName("weather_center"), "scenery", tmp );
}
};
StrListID = StrList {
Size = 10240;
List = {
"field_and_rock",
"cornfield",
"forest",
"shoreline",
"wheatfield",
"valley2",
"bridge",
"distant_forest",
"rutted_field",
"marsh",
"badlands",
"bn_grass_field",
"downtown",
"grass_field",
"canola_field",
"canal",
"cliffs",
"hilly_sides",
"suburbs",
"tundra",
"l_industrial",
"muddy_field",
"d_forest"
};
};
ChildID = {
GuiScrollBar ("sb") {
Kind = VERTICAL;
ChildID = {
GuiButton("thumb") {
StyleID = "gui/square/scrollbar/sb_thumb.gbs";
},
GuiButton("dec") {
StyleID = "gui/square/scrollbar/sb_uarrow.gbs";
},
GuiButton("inc") {
StyleID = "gui/square/scrollbar/sb_darrow.gbs";
}
};
}
};
},
GuiListbox("adornments") {
X = 200;
Y = 300;
Height = 180;
Width = 180;
ListHilightedColor = #7FAFFF;
ScriptID = Script {
@activate {
str tmp;
tmp = GuiListboxGetSelected(SELF);
ResPropSetStr(GuiSiblingByName("weather_center"), "adornment", tmp );
}
};
StrListID = StrList {
Size = 10240;
List = {
"barn",
"barrier",
"barrier1",
"barrier2",
"bush",
"bush_dry",
"cattle",
"combine",
"cows",
"fence1",
"fence2",
"fence3",
"fir_bunch",
"freighter",
"house",
"house1",
"house2",
"lone_fir",
"lone_fir_bare",
"lone_maple",
"maple_bunch",
"moose",
"railroad_tracks",
"sailboat",
"silo",
"null"
};
};
ChildID = {
GuiScrollBar ("sb") {
Kind = VERTICAL;
ChildID = {
GuiButton("thumb") {
StyleID = "gui/square/scrollbar/sb_thumb.gbs";
},
GuiButton("dec") {
StyleID = "gui/square/scrollbar/sb_uarrow.gbs";
},
GuiButton("inc") {
StyleID = "gui/square/scrollbar/sb_darrow.gbs";
}
};
}
};
},
GuiTextInput("lf_offset_x") {
X = 520;
Y = 300;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(52/*"left flicker offset x:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid lfx;
lfx = ResPropGetResID(GuiSiblingByName("left_flicker"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(lfx,"OffsetX")) );
}
};
},
GuiTextInput("lf_offset_y") {
X = 520;
Y = 320;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(53/*"left flicker offset y:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid lfy;
lfy = ResPropGetResID(GuiSiblingByName("left_flicker"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(lfy,"OffsetY")) );
}
};
},
GuiTextInput("la_offset_x") {
X = 520;
Y = 340;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(54/*"left adorn offset x:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid la;
la = ResPropGetResID(GuiSiblingByName("left_adorn1"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(la,"OffsetX")) );
}
};
},
GuiTextInput("la_offset_y") {
X = 520;
Y = 360;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(55/*"left adorn offset y:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid la;
la = ResPropGetResID(GuiSiblingByName("left_adorn1"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(la,"OffsetY")) );
}
};
},
GuiTextInput("ra_offset_x") {
X = 520;
Y = 380;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(56/*"right adorn offset x:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid ra;
ra = ResPropGetResID(GuiSiblingByName("right_adorn1"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(ra,"OffsetX")) );
}
};
},
GuiTextInput("ra_offset_y") {
X = 520;
Y = 400;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(57/*"right adorn offset y:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid ra;
ra = ResPropGetResID(GuiSiblingByName("right_adorn1"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(ra,"OffsetY")) );
}
};
},
GuiTextInput("rf_offset_x") {
X = 520;
Y = 420;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(58/*"right flicker offset x:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid lfx;
lfx = ResPropGetResID(GuiSiblingByName("right_flicker"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(lfx,"OffsetX")) );
}
};
},
GuiTextInput("rf_offset_y") {
X = 520;
Y = 440;
Width = 185;
Height = 20;
TextX = -105;
TextID = Mangle(59/*"right flicker offset y:"*/);
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid lfy;
lfy = ResPropGetResID(GuiSiblingByName("right_flicker"),"AnimationID");
ResPropSetStr(SELF,"InputText",IntToStr(ResPropGetInt(lfy,"OffsetY")) );
}
};
},
GuiButton("main_menu") {
X = 10;
Y = 10;
TextID = Mangle(60/*"Main Menu"*/);
StyleID = "gui/bs/square.gbs";
FontID = "font/square_black_on_gray_9.tf";
Width = 150;
AutoSize = HEIGHT;
ScriptID = Script {
@activate {
release("floor");
mark("floor");
ResByName("splash_screen.gl");
}
};
}
};
}